package ar.com.equis.flexjavaintegration.service;

import org.springframework.flex.remoting.RemotingDestination;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import ar.com.equis.flexjavaintegration.cliente.Cliente;
import ar.com.equis.flexjavaintegration.dao.ClienteDAO;

@Service("clienteService")
@RemotingDestination
public class ClienteService extends GenericServiceImplementacion<Cliente, ClienteDAO> {

	@Transactional
	public String hola(String name){
		Cliente clienteNuevo = new Cliente();
		clienteNuevo.setNombre(name);
		dao.save(clienteNuevo);
		return dao.findAll().get(0).getNombre();
	}
}
